package com.spc.car.data.service.project.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.spc.car.data.entity.project.ProjectRolePermission;
import com.spc.car.data.mapper.project.ProjectRolePermissionMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.spc.car.data.service.project.ProjectRolePermissionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 项目角色权限关联表 服务实现类
 * </p>
 *
 * @author 
 * @since 2020-04-27
 */
@Service
public class ProjectRolePermissionServiceImpl extends ServiceImpl<ProjectRolePermissionMapper, ProjectRolePermission> implements ProjectRolePermissionService {

    @Override
    public List<ProjectRolePermission> listRolePermission(Integer roleId) {
        QueryWrapper condition = new QueryWrapper();
        condition.eq("project_role_id", roleId);

        return list(condition);
    }

    @Override
    public List<String> listPermission(Integer roleId) {

        return baseMapper.listPermission(roleId);
    }
}
